Tack.Action = new Class({
	args: {},
	type: 'Tack.Action',

	changeSceneReferences: function (oldName, newName) {},

	compile: function () {
		var values = {};
		for (var property in this.args)
			values[property] = this[property];

		return [this.type, values];
	},

	remove: function () {
		this.actionBlock.actions.remove(this);
	},

	setActionBlock: function (actionBlock) {
		this.actionBlock = actionBlock;
		this.scene = actionBlock.scene;
	}
});

Tack.Action.decompile = function (arr) {
	var type = Tack.Action[arr[0]];
	if (!type)
		throw 'Encountered unknown action type.';

	var action = new type();
	for (var i in action.args) {
		action[i] = arr[1][i];
	}

	return action;
};
